import { _decorator, Component, director, Node } from 'cc';
const { ccclass, property } = _decorator;


/** 
 * 节点层级
 * Root根节点
 *      AudioManager
 *      TimerManager
 * UIManager界面层节点
 *      2d相机
 *          
 */

/** 
 * 框架显示层根节点
 */
@ccclass('Root')
export class Root extends Component {
    
    /** 界面层节点 */
    @property({
        type: Node,
        tooltip: "界面层"
    })
    ui: Node = null;

    protected onLoad(): void {
        this.init();
        
        
    }

    protected init() {
        // 创建持久根节点
        director.addPersistRootNode(this.node);

        director.addPersistRootNode(this.ui);

        // const am = new Node("AudioManager");
        // this.node.addChild(am);

        // // TimerManager
        // const tm = new Node("TimerManager");
        // this.node.addChild(tm);

     
    }
}

